home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2867 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: cheese.engr.ucdavis.edu!kvankatw
  2. From: kvankatw@cheese.engr.ucdavis.edu (Kirk Van Katwyk)
  3. Newsgroups: comp.lang.c,comp.sys.hp.hpux,gnu.gcc.help
  4. Subject: printf(), Inf/NaN & HP-UX
  5. Date: 23 Jan 1996 18:49:27 GMT
  6. Organization: Integration Engineering Lab, UC Davis
  7. Message-ID: <4e3ajn$ang@mark.ucdavis.edu>
  8. NNTP-Posting-Host: cheese.engr.ucdavis.edu
  9. Summary: How do I print out Inf/NaN's on HP-UX?
  10. Keywords: Inf, NaN, HP-UX, printf()
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Is there a way to print out "Inf" and "NaN" on HP-UX?
  14.  
  15. We compiled the code below on SunOS using GNU's gcc and the
  16. output is
  17.  
  18.     f = Inf
  19.     f = NaN
  20.  
  21. On HP-UX, the output is
  22.  
  23.     f = ++.000000
  24.     f = ?.000000
  25.  
  26. I know that this is not standardized, but is there a gcc option
  27. that we can set to print out "Inf" and "NaN" on HP-UX?
  28.  
  29. Kirk.
  30. ====================================================================
  31. Kirk Van Katwyk                   Integration Engineering Laboratory
  32. kvankatw@engr.ucdavis.edu               Mech & Aero Engineering Dept
  33. http://www.engr.ucdavis.edu/~kvankatw/          Univ of Calif, Davis
  34.